package cn.com.dhcc.app.pub.core.job;

import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import cn.com.dhcc.app.core.exception.ServiceException;
import cn.com.dhcc.app.core.service.Log;
import cn.com.dhcc.app.core.service.Log.LOGTYPE;
import cn.com.dhcc.app.pub.CM;
import cn.com.dhcc.ddi.task.service.TaskService;

/**
 * 
 * @日期：2016/12/15 10:39:32
 * @作者：李博宇
 * @版权所有：东华软件
 * @版本：1.0
 */
public class CheckTimedTasksJob implements Job{

	private static Logger logger = Log.getLogger(LOGTYPE.DDI);
	@Override
	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		 TaskService taskService = CM.getBean(TaskService.class);
		 try {
			taskService.startTimeTasks();
		} catch (ServiceException e) {
			logger.error("启动定时任务失败", e);
		}
		
	}

}
